package com.epalmpay.controller.channel.datareport;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.epalmpay.dto.datareport.BaseReportInDTO;
import com.epalmpay.dto.datareport.FlowChargeReportInfoListOutDTO;
import com.epalmpay.dto.datareport.FlowChargeReportListOutDTO;
import com.epalmpay.dto.datareport.OilChargeReportInfoListOutDTO;
import com.epalmpay.dto.datareport.OilChargeReportListOutDTO;
import com.epalmpay.exception.ApplicationException;
import com.epalmpay.service.yunstream.IOilcardOrderService;

@Controller
@RequestMapping(value="/merchant/oilChargeReport")
public class FlowAndOilChargeReportController {

	@Resource
	private IOilcardOrderService oilcardOrderService;
	/**
	 * 显示油卡充值 收入对账数据列表
	 * @param 
	 * @return
	 */
	@RequestMapping(value="/oilChargeReportList")
	@ResponseBody
	public OilChargeReportListOutDTO  oilChargeReportList (BaseReportInDTO baseReportInDTO){
		OilChargeReportListOutDTO  result=new OilChargeReportListOutDTO();
		try {
			result = oilcardOrderService.oilChargeReportList(baseReportInDTO);
		} catch (ApplicationException ae) {
			result = null;
			ae.printStackTrace();
		} catch (Exception e) {
			result = null;
			e.printStackTrace();
		}
		
		return result;
	}
	
	
	
	/**
	 * 显示油卡充值 收入对账数据明细列表
	 * @param 
	 * @return
	 */
	@RequestMapping(value="/oilChargeReportInfoList")
	@ResponseBody
	public OilChargeReportInfoListOutDTO  oilChargeReportInfoList (BaseReportInDTO baseReportInDTO){
		OilChargeReportInfoListOutDTO  result=new OilChargeReportInfoListOutDTO();
		try {
			result = oilcardOrderService.oilChargeReportInfoList(baseReportInDTO);
		} catch (ApplicationException ae) {
			result = null;
			ae.printStackTrace();
		} catch (Exception e) {
			result = null;
			e.printStackTrace();
		}
		
		return result;
	}
	
	
	/**
	 * 显示流量卡充值 收入对账数据列表
	 * @param 
	 * @return
	 */
	@RequestMapping(value="/flowChargeReportList")
	@ResponseBody
	public FlowChargeReportListOutDTO  flowChargeReportList (BaseReportInDTO baseReportInDTO){
		FlowChargeReportListOutDTO  result=new FlowChargeReportListOutDTO();
		try {
			result = oilcardOrderService.flowChargeReportList(baseReportInDTO);
		} catch (ApplicationException ae) {
			result = null;
			ae.printStackTrace();
		} catch (Exception e) {
			result = null;
			e.printStackTrace();
		}
		
		return result;
	}
	
	
	
	/**
	 * 显示油卡充值 收入对账数据列表
	 * @param 
	 * @return
	 */
	@RequestMapping(value="/flowChargeReportInfoList")
	@ResponseBody
	public FlowChargeReportInfoListOutDTO  flowChargeReportInfoList (BaseReportInDTO baseReportInDTO){
		FlowChargeReportInfoListOutDTO  result=new FlowChargeReportInfoListOutDTO();
		try {
			result = oilcardOrderService.flowChargeReportInfoList(baseReportInDTO);
		} catch (ApplicationException ae) {
			result = null;
			ae.printStackTrace();
		} catch (Exception e) {
			result = null;
			e.printStackTrace();
		}
		
		return result;
	}
	
}
